$(document).ready(function() {


    var lineChartData = {
        labels : [weekDayArray[0],weekDayArray[1],weekDayArray[2]
        ,weekDayArray[3],weekDayArray[4],weekDayArray[5],weekDayArray[6]],
        datasets : [
            {
            	//出库
                fillColor : "rgba(220,220,220,0.5)",
                strokeColor : "rgba(220,220,220,1)",
                pointColor : "rgba(220,220,220,1)",
                pointStrokeColor : "#fff",
                data : [parseInt(jsonArray[14]),parseInt(jsonArray[15]),parseInt(jsonArray[16])
                        ,parseInt(jsonArray[17]),parseInt(jsonArray[18]),parseInt(jsonArray[19]),parseInt(jsonArray[20])]
            },
            {
            	//入库
                fillColor : "rgba(151,187,205,0.5)",
                strokeColor : "rgba(151,187,205,1)",
                pointColor : "rgba(151,187,205,1)",
                pointStrokeColor : "#fff",
                data : [parseInt(jsonArray[7]),parseInt(jsonArray[8]),parseInt(jsonArray[9])
                        ,parseInt(jsonArray[10]),parseInt(jsonArray[11]),parseInt(jsonArray[12]),parseInt(jsonArray[13])]
            }
        ]

    };
    var pieData = [
               {
                   value: parseInt(jsonArray[0]),
                   color:"#f3bc55"
               },
               {
                   value : parseInt(jsonArray[1]),
                   color : "#E0E4CC"
               },
               {
                   value : parseInt(jsonArray[2]),
                   color : "#f0b4a8"
               },
               {
                   value : parseInt(jsonArray[3]),
                   color : "#69D2E7"
               },
               {
                   value : parseInt(jsonArray[4]),
                   color : "#aff330"
               },
               {
                   value : parseInt(jsonArray[5]),
                   color : "#62c181"
               },
               {
                   value : parseInt(jsonArray[6]),
                   color : "#7f7b80"
               }
           ];

    new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData);
    new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData);

});